<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<html>
<head>
<title>澳斯浪廷会员平台</title>
<link href="<c:url value='/resources/css/css.css'/>" type="text/css" rel="stylesheet" />
<link href="<c:url value='/resources/css/zTreeStyle/zTreeStyle.css'/>" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resources/js/jquery.ztree.all-3.5.min.js'/>"></script>

</head>
<body leftmargin="0">
<div class="main">
<div class="width_l">
    <iframe src="menu.action" frameborder="0" width="250" height="100%" class="menu"></iframe>
</div>
    <div class="right">
    <div class="width_r">
        <div class="menu_r">
            <ul>
                <li><a href="index.action">首页</a></li>
                <li><a href="information.action">消息</a></li>
                <li><a href="notice.action">公告中心</a></li>
                <li><a href="news.action">新闻中心</a></li>
                <li><a href="inbox.action">收件箱</a></li>
                <li><a href="tomail.action">写邮件</a></li>
                <li><a href="sent.action">已发送</a></li>
                <li><a href="${ctx}/exit.action">安全退出</a></li> 
            </ul>
        </div>
        <div class="news_top"><img src="<c:url value='/resources/images/top.jpg'/>" /></div>
        <div class="news">
          <h4>推荐图谱</h4>
          <div class="tupu">
          	<ul id="recommendtupu" class="ztree"></ul>
          
          
          </div> 
          </div>
        <div class="news_down"><img src="<c:url value='/resources/images/down.jpg'/>" /></div>
    </div>
	</div>
</div>
</body>
<script type="text/javascript">
	var zTreeObj;
	var treeNodes = ${treedata};
	var setting = {
		    data: {
		        simpleData: {
		        	enable: true,
					idKey: "id",
					pIdKey: "pId",
					rootPId: 0,
		        }
		    },
		    async: {
				enable: true,
				url: "${ctx}/findchild.action",
				autoParam: ["id=reAccount"],
				type:"post",//请求方式   
			}		
		};
	
	function onNodeClick(event, treeId, treeNode) {
		alert(treeNode.id + ", " + treeNode.name);
		alert(treeId);
		/* var toNodeCode = treeId.substring(0, 2);
		var toNodeCheckBox = toNodeCode + "toNodeName";
		setChoosedApUsers(); */
	}
	
	$(document).ready(function(){
		zTreeObj = $.fn.zTree.init($("#recommendtupu"), setting, treeNodes);
	});
</script>
</html>